<?php

namespace App\Http\Controllers\Admin\Api;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Facades\DeviceService;

class DeviceController extends Controller
{
    public function getStatus($request)
    {
        switch ($request->status) {
            case '缺水':
                $status = \App\Models\DeviceRecord::HYDROPENIA;
                break;
            case '检修':
                $status = \App\Models\DeviceRecord::OVERHAUL;
                break;
            case '漏水':
                $status = \App\Models\DeviceRecord::LEAKAGE;
                break;
            case '正常':
                $status = '正常';
                break;
            
            default:
                $status = '';
                break;
        }
        return $status;
    }
}
